package com.crm.service.impl.sys;

import com.crm.dao.mapper.customMapper.sys.UserCareCustomMapper;
import com.crm.dao.mapper.sys.UserCareMapper;
import com.crm.model.entity.sys.UserCare;
import com.crm.service.sys.UserCareDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:chaifuyou
 * @Date: 2021/5/25 11:13
 */
@Service
public class UserCareDbServiceImpl implements UserCareDbService {

    @Autowired
    private UserCareMapper userCareMapper;

    @Autowired
    private UserCareCustomMapper userCareCustomMapper;

    /**
     * 添加关注
     * @param userCare
     */
    @Override
    public void addUserCare(UserCare userCare) {
        userCareMapper.insertSelective(userCare);
    }

    /**
     * 取消关注
     * @param careAccountId 被关注人id
     * @param accountId 关注人id
     */
    @Override
    public void delUserCare(String careAccountId, String accountId) {
        userCareCustomMapper.delUserCare(careAccountId,accountId);
    }
}
